package ${domain}.module.wsys.req;

import ${domain}.frame.base.BaseRequest;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import ${domain}.frame.validation.Select;

/**
 * LogtaskCreateRequest - 任务日志新增
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2020-09-04
 */
public class LogtaskCreateRequest extends BaseRequest {

    /**
     * 任务ID.
     */
    @NotBlank(message = "[taskId]任务ID不能为空")
    @Length(min = 0, max = 50, message = "[taskId]任务ID长度不合法(0-50)")
    private String taskId;

    /**
     * 任务名称.
     */
    @NotBlank(message = "[taskName]任务名称不能为空")
    @Length(min = 0, max = 50, message = "[taskName]任务名称长度不合法(0-50)")
    private String taskName;

    /**
     * 开始时间.
     */
    @NotNull(message = "[startTime]开始时间不能为NULL")
    private Date startTime;

    /**
     * 结束时间.
     */
    @NotNull(message = "[endTime]结束时间不能为NULL")
    private Date endTime;

    /**
     * 执行耗时.
     */
    @NotNull(message = "[execTime]执行耗时不能为NULL")
    private Integer execTime;

    /**
     * 执行状态.
     * 1:成功
     * 0:失败
     */
    @NotNull(message = "[execState]执行状态不能为NULL")
    @Select({"1", "0"})
    private String execState;

    /**
     * 执行结果.
     */
    @Length(min = 0, max = 500, message = "[execResult]执行结果长度不合法(0-500)")
    private String execResult;

    public String getTaskId() {
        return this.taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getTaskName() {
        return this.taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public Date getStartTime() {
        return this.startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return this.endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getExecTime() {
        return this.execTime;
    }

    public void setExecTime(Integer execTime) {
        this.execTime = execTime;
    }

    public String getExecState() {
        return this.execState;
    }

    public void setExecState(String execState) {
        this.execState = execState;
    }

    public String getExecResult() {
        return this.execResult;
    }

    public void setExecResult(String execResult) {
        this.execResult = execResult;
    }
}
